<script setup>
import { ref, reactive } from 'vue'
import { imgUrls } from "@/network/request";
// 逻辑代码
// 定义 props 接收父组件传进来的数据
defineProps({ list: { type: Array, required: true } })


</script>

<template>
    <div>
        <!-- 活动分类 -->
        <div style="background-color:#FFFFFF;margin-top:5px;">
            <div style="margin-top: 5px;">
                <van-grid :column-num="4" :border="false">
                    <van-grid-item v-for="item in list" :key="item.id" :to="item.url">
                        <van-image width="50" height="50" :src="imgUrls + item.pic" />
                        <span style="font-size: 16px; margin-top: 5px;">
                            {{ item.name }}
                        </span>
                    </van-grid-item>
                </van-grid>
            </div>
        </div>
    </div>
</template>

<style scoped></style>